<template>
  <div class="test">测试</div>
</template>
<script setup>
import { onMounted, reactive, ref, getCurrentInstance } from "vue";
//获取axios实例
const axios = getCurrentInstance().appContext.config.globalProperties.$axios;
const data = reactive([]);
const state = ref(0);
const loading = ref(false);
const loadingtext = ref("数据加载中...");
onMounted(() => {
  getdata();
});
const getdata = async () => {
  loading.value = true;
  try {
    // const res = await axios.post("/yun/yunList", {
    //   pageIndex: 1,
    //   pageSize: 50,
    // });
  
  } catch (error) {
    // 处理错误情况
    state.value = 1;
    console.error("请求失败:", error);
  }
};
</script>
<style scoped lang="less">
  .test{
    width: 750px;
    height: 100px;
    background: red;
    font-family: PingFangSC, PingFang SC;
    font-size: 34px;
    color: #333333;
  }
</style>